/// 当前页结果集
class WriteoffOrderPageResponseDto {
  /// 主键id
  final int? id;
  /// 订单号
  final String? orderNum;
  /// 上传用户ID
  final int? userId;
  /// 上传用户
  final String? userName;
  /// 用户等级
  final String? userLevelName;
  /// 赎回率
  final String? redemptionRate;
  /// 卡种类
  final String? cardType;
  /// 卡分类
  final String? cardCategory;
  /// 卡片额度
  final int? cardAmount;
  /// 卡片价值
  final int? cashValue;
  /// 卡片代码
  final List<String>? cardCodeList;
  /// 卡片地址
  final List<String>? cardUrlList;
  /// 上传时间
  final String? createTime;
  /// 是否已接收订单：1-是，0-否
  final int? accept;
  /// 手机客户提交订单前查到的最高核销报价，单位美元
  final String? price;
  /// 手机客户提交订单前查到的最高财务报价，美元兑换奈拉的汇率
  final String? rate;
  /// 手机客户提交订单前查到的平台折扣，小数
  final String? discount;

  WriteoffOrderPageResponseDto({
    this.id,
    this.orderNum,
    this.userId,
    this.userName,
    this.userLevelName,
    this.redemptionRate,
    this.cardType,
    this.cardCategory,
    this.cardAmount,
    this.cashValue,
    this.cardCodeList,
    this.cardUrlList,
    this.createTime,
    this.accept,
    this.price,
    this.rate,
    this.discount,
  });

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    if (id != null) data['id'] = id;
    if (orderNum != null) data['orderNum'] = orderNum;
    if (userId != null) data['userId'] = userId;
    if (userName != null) data['userName'] = userName;
    if (userLevelName != null) data['userLevelName'] = userLevelName;
    if (redemptionRate != null) data['redemptionRate'] = redemptionRate;
    if (cardType != null) data['cardType'] = cardType;
    if (cardCategory != null) data['cardCategory'] = cardCategory;
    if (cardAmount != null) data['cardAmount'] = cardAmount;
    if (cashValue != null) data['cashValue'] = cashValue;
    if (cardCodeList != null) data['cardCodeList'] = cardCodeList;
    if (cardUrlList != null) data['cardUrlList'] = cardUrlList;
    if (createTime != null) data['createTime'] = createTime;
    if (accept != null) data['accept'] = accept;
    if (price != null) data['price'] = price;
    if (rate != null) data['rate'] = rate;
    if (discount != null) data['discount'] = discount;
    return data;
  }

  factory WriteoffOrderPageResponseDto.fromJson(Map<String, dynamic> json) {
    return WriteoffOrderPageResponseDto(
      id: json['id'],
      orderNum: json['orderNum'],
      userId: json['userId'],
      userName: json['userName'],
      userLevelName: json['userLevelName'],
      redemptionRate: json['redemptionRate'],
      cardType: json['cardType'],
      cardCategory: json['cardCategory'],
      cardAmount: json['cardAmount'],
      cashValue: json['cashValue'],
      cardCodeList: json['cardCodeList'] != null ? List<String>.from(json['cardCodeList']) : null,
      cardUrlList: json['cardUrlList'] != null ? List<String>.from(json['cardUrlList']) : null,
      createTime: json['createTime'],
      accept: json['accept'],
      price: json['price'],
      rate: json['rate'],
      discount: json['discount'],
    );
  }
}